package com.china.zhuoyue

import android.app.Application
import android.content.Context
import androidx.multidex.MultiDex
import com.china.zhuoyue.ui.AppCore
import com.china.zhuoyue.ui.utils.Logger
import com.china.zhuoyue.utils.SignCheckUtil
import com.didi.drouter.api.DRouter
import com.uphone.kingmall.app.MyApplication


class App : Application() {

    override fun onCreate() {
        super.onCreate()
        val signCheckUtil = SignCheckUtil(this, "SHA1")
        if (signCheckUtil.check()) {
            Logger.e("签名正确")
        } else {
            Logger.e("签名错误")
            throw RuntimeException("请不要使用非法软件")
        }
        AppCore.init(this)
        DRouter.init(this)
        MyApplication().onCreate(this)
    }

    override fun attachBaseContext(context: Context?) {
        super.attachBaseContext(context)
        MultiDex.install(this)
    }

}